﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Light.Framework.Model;
using Light.Framework.Contract;
using Light.Weixin.Model;

namespace Light.Weixin.Contract
{
    /// <summary>
    /// 微信平台应用（公众号，移动应用，网站应用）访问组件
    /// </summary>
    public interface IWxAppComponent : IComponent<WxApp>
    {
        /// <summary>
        /// 获取指定类型的默认应用，未设置默认项，则取第一个
        /// </summary>
        /// <param name="type">应用类型</param>
        /// <returns></returns>
        WxApp Get(WxAppType type);

        /// <summary>
        /// 根据公众号AppId获取公众号
        /// </summary>
        /// <param name="appId"></param>
        /// <returns></returns>
        WxApp GetByAppId(string appId);

        /// <summary>
        /// 根据原始Id获取公众号
        /// </summary>
        /// <param name="orginalId"></param>
        /// <returns></returns>
        WxApp GetByOrginalID(string orginalId);
    }
}
